//控件注册
//主页是以 Tab-pane 去承担每个控件,不以路由
//路由不好的地方只能打开一个
import { defineAsyncComponent } from "vue"
//import TFormCompany from "@/views/rightManage/Company/CompanyList.vue"
//import TFormRoleList from "@/views/rightManage/Role/RoleList.vue"
//import TFormRoleRightEdit from "@/views/rightManage/Role/RoleRightEdit.vue"
//import TFormAdminList from "@/views/rightManage/Admin/AdminList.vue"

//异步加载控件,不是一次性加载，用到时才加载
const TDashboard = defineAsyncComponent(() =>
    import('@/views/Dashboard.vue')
)
const TFormModuleManage = defineAsyncComponent(() =>
    import('@/views/moduleSet/ModuleManage.vue')
)
const TFormModuleFileSet = defineAsyncComponent(() =>
    import('@/views/moduleSet/ModuleFileSet.vue')
)
const TFormModuleEdit = defineAsyncComponent(() =>
    import('@/views/moduleSet/ModuleEdit.vue')
)
const TFormModuleDB = defineAsyncComponent(() =>
    import('@/views/moduleSet/ModuleDB.vue')
)
const TFormWXAccount = defineAsyncComponent(() =>
    import('@/views/weixin/WXAccount.vue')
)
const TFormWXMenuList = defineAsyncComponent(() =>
    import('@/views/weixin/WXMenuList.vue')
)

//
const TFormCompanyClass = defineAsyncComponent(() =>
    import('@/views/rightManage/Company/CompanyClass.vue')
)
const TFormCompany = defineAsyncComponent(() =>
    import('@/views/rightManage/Company/CompanyList.vue')
)
const TFormRoleList = defineAsyncComponent(() =>
    import('@/views/rightManage/Role/RoleList.vue')
)
const TFormRoleRightEdit = defineAsyncComponent(() =>
    import('@/views/rightManage/Role/RoleRightEdit.vue')
)
//管理员
const TFormAdminList = defineAsyncComponent(() =>
    import('@/views/rightManage/Admin/AdminList.vue')
)
//个人权限
const TFormPersonRightEdit = defineAsyncComponent(() =>
    import('@/views/rightManage/Role/personRight/PersonRightEdit.vue')
)
//流水号配置
const TFormLshList = defineAsyncComponent(() =>
    import('@/views/rightManage/Lsh/LshList.vue')
)

const TFormProcessSetList = defineAsyncComponent(() =>
    import('@/views/processSet/ProcessSetList.vue')
)
//****************Cms管理系统*****************/
const TFormCmsList = defineAsyncComponent(() =>
    import('@/views/cms/CmsList.vue')
)
const TFormCmsMenu = defineAsyncComponent(() =>
    import('@/views/cms/CmsMenu.vue')
)
const TFormCmsEditor = defineAsyncComponent(() =>
    import('@/views/cms/CmsEditor.vue')
)
const TFormCmsQuestionList = defineAsyncComponent(() =>
    import('@/views/cms/CmsQuestionList.vue')
)
//****************数据库信息获取*****************/
const TFormDataBaseObjectList = defineAsyncComponent(() =>
    import('@/views/moduleSet/dataBase/DataBaseObjectList.vue')
)
const TFormDataBaseFieldList = defineAsyncComponent(() =>
    import('@/views/moduleSet/dataBase/DataBaseFieldList.vue')
)
//********************************** */
const ReportDesignMain = defineAsyncComponent(() =>
    import('@/components/reportDesign/ReportDesignMain.vue')
)
const TFormReportList = defineAsyncComponent(() =>
    import('@/views/report/ReportList.vue')
)
//
const vxTableTest = defineAsyncComponent(() =>
    import('@/views/vxtable/vxTableTest.vue')
)
//

//**************模块登陆配置*********/
const TFormModuleLoginList = defineAsyncComponent(() =>
    import('@/views/moduleLogin/ModuleLoginList.vue')
)
//**************微信消息发送*********/
const TFormTemplateList = defineAsyncComponent(() =>
    import('@/views/weixin/Template/TemplateList.vue')
)
const TFormTemplateEidt = defineAsyncComponent(() =>
    import('@/views/weixin/Template/TemplateEidt.vue')
)
//**************百度相关功能*********/
const TFormBaiduAccountList = defineAsyncComponent(() =>
    import('@/views/baidu/BaiduAccountList.vue')
)

//*********echarts*****/
const TEchartDemo1 = defineAsyncComponent(() =>
    import('@/views/echarts/Demo1.vue')
)
//********fromDesgion*********/
const DragDemo1 = defineAsyncComponent(() =>
    import('@/views/formDesign/DraggableDemo/DragDemo1.vue')
)
export default (app: any) => {
    app.component("TDashboard", TDashboard);
    app.component("TFormModuleManage", TFormModuleManage); //模块管理
    app.component("TFormModuleEdit", TFormModuleEdit);  //模板编辑
    app.component("TFormModuleDB", TFormModuleDB);     //数据库配置
    app.component("TFormWXAccount", TFormWXAccount);   //微信账号
    app.component("TFormWXMenuList", TFormWXMenuList);   //微信菜单
    app.component("TFormModuleFileSet", TFormModuleFileSet); //文件配置
    //权限
    app.component("TFormCompanyClass", TFormCompanyClass); //结构类型
    app.component("TFormCompany", TFormCompany);  //集团结构
    app.component("TFormRoleList", TFormRoleList);  //角色列表
    app.component("TFormAdminList", TFormAdminList); //管理员
    app.component("TFormRoleRightEdit", TFormRoleRightEdit); //角色权限
    app.component("TFormPersonRightEdit", TFormPersonRightEdit); //个人权限
    app.component("TFormLshList", TFormLshList); //流水号
    app.component("TFormProcessSetList", TFormProcessSetList); //流程步骤
    //Cms管理系统配置
    app.component("TFormCmsList", TFormCmsList); //cms列表
    app.component("TFormCmsMenu", TFormCmsMenu); //cms列表
    app.component("TFormCmsEditor", TFormCmsEditor); //cms列表
    app.component("TFormCmsQuestionList", TFormCmsQuestionList); //cms列表
    //
    app.component("TFormDataBaseObjectList", TFormDataBaseObjectList);
    app.component("TFormDataBaseFieldList", TFormDataBaseFieldList);
    //
    app.component("ReportDesignMain", ReportDesignMain);
    //
    app.component("vxTableTest", vxTableTest);
    //
    app.component("TFormReportList", TFormReportList);
    //
    app.component("TFormModuleLoginList", TFormModuleLoginList); //模块登陆配置
    //
    app.component("TFormTemplateList", TFormTemplateList); //模块登陆配置
    app.component("TFormTemplateEidt", TFormTemplateEidt); //模块登陆配置
    //
    app.component("TFormBaiduAccountList", TFormBaiduAccountList);
    //
    app.component("TEchartDemo1", TEchartDemo1);
    //********fromDesgion*********/
    app.component("DragDemo1", DragDemo1);
}